3.282 \(\int \frac{x (d+e x)}{a+c x^2} \, dx\)

Optimal. Leaf size=49 \[ -\frac{\sqrt{a} e \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{c^{3/2}}+\frac{d \log \left (a+c x^2\right )}{2 c}+\frac{e x}{c} \]

[Out]

(e*x)/c - (Sqrt[a]*e*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/c^(3/2) + (d*Log[a + c*x^2])/(2*c)

________________________________________________________________________________________

Rubi [A]  time = 0.0265298, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {774, 635, 205, 260} \[ -\frac{\sqrt{a} e \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{c^{3/2}}+\frac{d \log \left (a+c x^2\right )}{2 c}+\frac{e x}{c} \]

Antiderivative was successfully verified.

[In]

Int[(x*(d + e*x))/(a + c*x^2),x]

[Out]

(e*x)/c - (Sqrt[a]*e*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/c^(3/2) + (d*Log[a + c*x^2])/(2*c)

Rule 774

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*g*x)/c, x] + Dist[1
/c, Int[(c*d*f - a*e*g + c*(e*f + d*g)*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{x (d+e x)}{a+c x^2} \, dx &=\frac{e x}{c}+\frac{\int \frac{-a e+c d x}{a+c x^2} \, dx}{c}\\ &=\frac{e x}{c}+d \int \frac{x}{a+c x^2} \, dx-\frac{(a e) \int \frac{1}{a+c x^2} \, dx}{c}\\ &=\frac{e x}{c}-\frac{\sqrt{a} e \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{c^{3/2}}+\frac{d \log \left (a+c x^2\right )}{2 c}\\ \end{align*}

Mathematica [A]  time = 0.0211244, size = 49, normalized size = 1. \[ -\frac{\sqrt{a} e \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{c^{3/2}}+\frac{d \log \left (a+c x^2\right )}{2 c}+\frac{e x}{c} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*(d + e*x))/(a + c*x^2),x]

[Out]

(e*x)/c - (Sqrt[a]*e*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/c^(3/2) + (d*Log[a + c*x^2])/(2*c)

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 43, normalized size = 0.9 \begin{align*}{\frac{ex}{c}}+{\frac{d\ln \left ( c{x}^{2}+a \right ) }{2\,c}}-{\frac{ae}{c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(e*x+d)/(c*x^2+a),x)

[Out]

e*x/c+1/2*d*ln(c*x^2+a)/c-1/c*a*e/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)/(c*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.52981, size = 238, normalized size = 4.86 \begin{align*} \left [\frac{e \sqrt{-\frac{a}{c}} \log \left (\frac{c x^{2} - 2 \, c x \sqrt{-\frac{a}{c}} - a}{c x^{2} + a}\right ) + 2 \, e x + d \log \left (c x^{2} + a\right )}{2 \, c}, -\frac{2 \, e \sqrt{\frac{a}{c}} \arctan \left (\frac{c x \sqrt{\frac{a}{c}}}{a}\right ) - 2 \, e x - d \log \left (c x^{2} + a\right )}{2 \, c}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)/(c*x^2+a),x, algorithm="fricas")

[Out]

[1/2*(e*sqrt(-a/c)*log((c*x^2 - 2*c*x*sqrt(-a/c) - a)/(c*x^2 + a)) + 2*e*x + d*log(c*x^2 + a))/c, -1/2*(2*e*sq
rt(a/c)*arctan(c*x*sqrt(a/c)/a) - 2*e*x - d*log(c*x^2 + a))/c]

________________________________________________________________________________________

Sympy [B]  time = 0.689682, size = 112, normalized size = 2.29 \begin{align*} \left (\frac{d}{2 c} - \frac{e \sqrt{- a c^{3}}}{2 c^{3}}\right ) \log{\left (x + \frac{- 2 c \left (\frac{d}{2 c} - \frac{e \sqrt{- a c^{3}}}{2 c^{3}}\right ) + d}{e} \right )} + \left (\frac{d}{2 c} + \frac{e \sqrt{- a c^{3}}}{2 c^{3}}\right ) \log{\left (x + \frac{- 2 c \left (\frac{d}{2 c} + \frac{e \sqrt{- a c^{3}}}{2 c^{3}}\right ) + d}{e} \right )} + \frac{e x}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)/(c*x**2+a),x)

[Out]

(d/(2*c) - e*sqrt(-a*c**3)/(2*c**3))*log(x + (-2*c*(d/(2*c) - e*sqrt(-a*c**3)/(2*c**3)) + d)/e) + (d/(2*c) + e
*sqrt(-a*c**3)/(2*c**3))*log(x + (-2*c*(d/(2*c) + e*sqrt(-a*c**3)/(2*c**3)) + d)/e) + e*x/c

________________________________________________________________________________________

Giac [A]  time = 1.1613, size = 59, normalized size = 1.2 \begin{align*} -\frac{a \arctan \left (\frac{c x}{\sqrt{a c}}\right ) e}{\sqrt{a c} c} + \frac{x e}{c} + \frac{d \log \left (c x^{2} + a\right )}{2 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x+d)/(c*x^2+a),x, algorithm="giac")

[Out]

-a*arctan(c*x/sqrt(a*c))*e/(sqrt(a*c)*c) + x*e/c + 1/2*d*log(c*x^2 + a)/c